let path = require('path')
// __dirname 
console.log('join:', path.join(__dirname, '/app', 'www'))
console.log('resolve:', path.resolve(__dirname, '/app', 'www'))
/* 不涉及到绝对路径的时候 两者没有区别；
  若参数是绝对路径 那么  join只是简单的拼接 resolve会解析到根目录拼接
*/

let str = 'https://baidu.com/qqq/www?qq=213&ee=234&tt=4564'
// let reg = /([^?=&]+)=([^?=&]+)/g
// let url = require('url')
// console.log(url.parse(str, true))
let res = new URL(str).searchParams;
// for (let k of res) {
//   console.log(k)
// }
console.log(new URL(str))

